<?xml version="1.0" encoding="UTF-8"?>
<ui:component xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

	<ui:composition template="/pages/templates/layout_principal.xhtml">
		<ui:define name="message">
			<rich:messages globalOnly="true" showSummary="true" showDetail="true">
			</rich:messages>
		</ui:define>

		<ui:define name="body">
			<h:form>
				<h:panelGrid styleClass="titulo">
					<h:outputText styleClass="titulo" value="Novo Projeto"  />
				</h:panelGrid>
				<br />

				<h:panelGrid columns="2">
					<h:outputText value="*Nome:" styleClass="form_label" />
					<h:panelGroup>
						<h:inputText value="#{manterProjetosControl.nome}" id="nome" required="true" maxlength="80" size="100" />
						<rich:message for="nome" />
					</h:panelGroup>
					
					<h:outputText value="*Início:" styleClass="form_label" />
					<h:panelGroup>
						<rich:calendar id="inicio" required="true" value="#{manterProjetosControl.inicio}"
							datePattern="dd/MM/yyyy" popup="true" disabled="#{manterProjetosControl.desabDatas}" />
						<rich:message for="inicio" />
					</h:panelGroup>
					
					<h:outputText value="*Fim:" styleClass="form_label" />
					<h:panelGroup>
						<rich:calendar id="fim" required="true" value="#{manterProjetosControl.fim}" 
							datePattern="dd/MM/yyyy" popup="true" disabled="#{manterProjetosControl.desabDatas}" />
						<rich:message for="fim" />
					</h:panelGroup>
					
					<h:outputText value="Acesso rápido:" styleClass="form_label" />
					<h:selectBooleanCheckbox value="#{manterProjetosControl.acessoRapido}" />
					
					<h:outputText value="Situação:" styleClass="form_label" />
					#{manterProjetosControl.situacao.descricao}
					
					<h:outputText value="Motivo Cancelamento:" styleClass="form_label" />
					<h:outputText value="#{manterProjetosControl.motivoCancelamento}" />
				</h:panelGrid>
				
				<br />
				
				<h:panelGrid columns="3" cellpadding="3" styleClass="botoes">
					<h:commandButton action="#{manterProjetosControl.salvar}" value="Salvar" />
					<h:commandButton action="#{manterProjetosControl.iniciar}" value="Voltar" immediate="true" />
				</h:panelGrid>
			</h:form>
		</ui:define>
	</ui:composition>

</ui:component>